package com.springboot.cloud.feignservice;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.springboot.cloud.entities.Article;
import com.springboot.cloud.entities.Comment;

@FeignClient(value = "MICROSERVICE")
public interface ConmmentFeignService {
	
	@RequestMapping(value = "/getcomments/{0}", method = RequestMethod.GET)
	public List<Comment> getcomments(@PathVariable("0")int article);
	
	@RequestMapping(value = "/getmycomments/{0}", method = RequestMethod.GET)
	public List<Comment> getmycomments(@PathVariable("0")int id);

	@RequestMapping(value = "/addcomment", method = RequestMethod.POST)
	public boolean addcomment(@RequestBody Comment c);

	@RequestMapping(value = "/comment/addlicke{id}", method = RequestMethod.GET)
	public boolean caddlike(@PathVariable("id")int id);

	@RequestMapping(value = "/comment/addnolike/{id}", method = RequestMethod.GET)
	public boolean caddnolike(@PathVariable("id")int id);

}
